﻿/***********************************************************************
 * <copyright file="JournalEntryAccount.cs" company="BUCA JSC">
 * -->    Copyright (C) statement. All right reserved
 * </copyright>
 * 
 * Created:   ThangND
 * Email:    thangnd@buca.vn
 * Website:
 * Create Date: 20 March 2014
 * Usage: 
 * 
 * RevisionHistory: 
 * Date         Author               Description 
 * 
 * ************************************************************************/

using System;
using BusinessObjects.BusinessRules;

namespace BusinessObjects.BussinessVoucher
{
    /// <summary>
    /// 
    /// </summary>
    public class TaxTrans : BusinessObject 
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="JournalEntryAccountEntity"/> class.
        /// </summary>
        public TaxTrans()
        {
            AddRule(new ValidateRequired("RefId"));
            AddRule(new ValidateRequired("RefDetailId"));
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="JournalEntryAccountEntity"/> class.
        /// </summary>
        /// <param name="journalEntryId">The journal entry identifier.</param>
        /// <param name="refId">The reference identifier.</param>
        /// <param name="refDetailId">The reference detail identifier.</param>
        /// <param name="refNo">The reference no.</param>
        /// <param name="refDate">The reference date.</param>
        /// <param name="postedDate">The posted date.</param>
        /// <param name="description">The description.</param>
        /// <param name="journalMemo">The journal memo.</param>
        /// <param name="currencyCode">The currency code.</param>
        /// <param name="exchangeRate">The exchange rate.</param>
        /// <param name="accountNumber">The account number.</param>
        /// <param name="correspondingAccountNumber">The corresponding account number.</param>
        /// <param name="quantity">The quantity.</param>
        /// <param name="journalType">Type of the journal.</param>
        /// <param name="amountOc">The amount oc.</param>
        /// <param name="amountExchange">The amount exchange.</param>
        /// <param name="budgetChapterCode">The budget chapter code.</param>
        /// <param name="budgetCategoryCode">The budget category code.</param>
        /// <param name="budgetSourceCode">The budget source code.</param>
        /// <param name="budgetItemCode">The budget item code.</param>
        /// <param name="customerId">The customer identifier.</param>
        /// <param name="vendorId">The vendor identifier.</param>
        /// <param name="voucherTypeId">The voucher type identifier.</param>
        /// <param name="bankAccount">The bank account.</param>
        /// <param name="employeeId">The employee identifier.</param>
        /// <param name="accountingObjectId">The accounting object identifier.</param>
        /// <param name="mergerFundId">The merger fund identifier.</param>
        /// <param name="projectId">The project identifier.</param>
        public TaxTrans(long taxTransId, long refId, long refDetailId, string refNo, DateTime refDate, string description, string accountNumber, string correspondingAccountNumber, int quantity, int journalType, decimal amountOc, int? customerId, int? vendorId, int? voucherTypeId, int unitId, string accountNumberVat, decimal amountVat, decimal taxRate)
            : this()
        {
            TaxTransId = taxTransId;
            RefId = refId;
            RefDetailId = refDetailId;
            RefTypeId = RefTypeId;
            RefNo = refNo;
            RefDate = refDate;        
            Description = description;        
            AccountNumber = accountNumber;
            CorrespondingAccountNumber = correspondingAccountNumber;
            Quantity = quantity;
            JournalType = journalType;
            AmountOc = amountOc;        
            CustomerId = customerId;
            VendorId = vendorId;
            VoucherTypeId = voucherTypeId;
            UnitId = unitId;

            AccountNumberVat = accountNumberVat;
            AmountVat = amountVat;
            TaxRate = taxRate;
        }

        /// <summary>
        /// Gets or sets the journal entry identifier.
        /// </summary>
        /// <value>
        /// The journal entry identifier.
        /// </value>
        public long TaxTransId { get; set; }

        /// <summary>
        /// Gets or sets the reference identifier.
        /// </summary>
        /// <value>
        /// The reference identifier.
        /// </value>
        public long RefId { get; set; }

        /// <summary>
        /// Gets or sets the reference detail identifier.
        /// </summary>
        /// <value>
        /// The reference detail identifier.
        /// </value>
        public long RefDetailId { get; set; }

        /// <summary>
        /// Gets or sets the reference type identifier.
        /// </summary>
        /// <value>
        /// The reference type identifier.
        /// </value>
        public int RefTypeId { get; set; }

        /// <summary>
        /// Gets or sets the reference no.
        /// </summary>
        /// <value>
        /// The reference no.
        /// </value>
        public string RefNo { get; set; }

        /// <summary>
        /// Gets or sets the reference date.
        /// </summary>
        /// <value>
        /// The reference date.
        /// </value>
        public DateTime RefDate { get; set; }

       

        /// <summary>
        /// Gets or sets the description.
        /// </summary>
        /// <value>
        /// The description.
        /// </value>
        public string Description { get; set; }

        

        /// <summary>
        /// Gets or sets the account number.
        /// </summary>
        /// <value>
        /// The account number.
        /// </value>
        public string AccountNumber { get; set; }

        /// <summary>
        /// Gets or sets the corresponding account number.
        /// </summary>
        /// <value>
        /// The corresponding account number.
        /// </value>
        public string CorrespondingAccountNumber { get; set; }

        /// <summary>
        /// Gets or sets the quantity.
        /// </summary>
        /// <value>
        /// The quantity.
        /// </value>
        public int Quantity { get; set; }

        /// <summary>
        /// Gets or sets the type of the journal.
        /// </summary>
        /// <value>
        /// The type of the journal.
        /// </value>
        public int JournalType { get; set; }

        /// <summary>
        /// Gets or sets the amount oc.
        /// </summary>
        /// <value>
        /// The amount oc.
        /// </value>
        public decimal AmountOc { get; set; }

       

        /// <summary>
        /// Gets or sets the customer identifier.
        /// </summary>
        /// <value>
        /// The customer identifier.
        /// </value>
        public int? CustomerId { get; set; }

        /// <summary>
        /// Gets or sets the vendor identifier.
        /// </summary>
        /// <value>
        /// The vendor identifier.
        /// </value>
        public int? VendorId { get; set; }

        /// <summary>
        /// Gets or sets the voucher type identifier.
        /// </summary>
        /// <value>
        /// The voucher type identifier.
        /// </value>
        public int? VoucherTypeId { get; set; }

        /// <summary>
        /// Gets or sets the reference identifier.
        /// </summary>
        /// <value>
        /// The reference identifier.
        /// </value>
        public long UnitId { get; set; }

        /// <summary>
        /// Gets or sets the account number.
        /// </summary>
        /// <value>
        /// The account number.
        /// </value>
        public string AccountNumberVat { get; set; } 

        /// <summary>
        /// Gets or sets the amount oc.
        /// </summary>
        /// <value>
        /// The amount oc.
        /// </value>
        public decimal AmountVat { get; set; }

        /// <summary>
        /// Gets or sets the amount oc.
        /// </summary>
        /// <value>
        /// The amount oc.
        /// </value>
        public decimal TaxRate { get; set; } 
    }
}